package com.vue.designPatterns.singleton;

/**
 * Created by Administrator on 2019/3/14.
 * 单例设计模式-饿汉式,一开始就初始化,线程安全的
 */
public class Singleton2 {

    private static Singleton2 singleton = new Singleton2();

    private Singleton2() {}

    private static Singleton2 getSingleton() {
        return singleton;
    }
}
